﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Butterfly.User.Library.Components.ib_User;
using Butterfly.User.Library.Components.ib_UserRole;
using System.Data;
using Butterfly.Library.Helper;

namespace Butterfly.User.Library.Providers
{
    public class SqlDataProvider : DataProvider
    {
        private string _strConn;

        public SqlDataProvider(string strConn)
        {
            ConnectionString = strConn;
        }

        public string ConnectionString
        {
            get { return _strConn; }
            set { _strConn = value; }
        }


        // User

        public override IDataReader User_GetAll()
        {
            return SqlHelper.ExecuteReader(ConnectionString, "ib_User_GetAll");
        }

        public override IDataReader User_GetInfoByUsername(string _username)
        {
            return SqlHelper.ExecuteReader(ConnectionString, "ib_User_GetAll");
        }

        public override IDataReader User_GetInfoByUserId(int _userId)
        {
            throw new NotImplementedException();
        }

        public override void User_Insert(ib_UserInfo objUser)
        {
            throw new NotImplementedException();
        }

        public override void User_Update(ib_UserInfo objUser)
        {
            throw new NotImplementedException();
        }

        public override void User_Delete(int _userId)
        {
            throw new NotImplementedException();
        }

        public override IDataReader UserRole_GetAll()
        {
            throw new NotImplementedException();
        }

        public override IDataReader UserRole_GetInfo(int _userRoleId)
        {
            throw new NotImplementedException();
        }

        public override void UserRole_Insert(ib_UserRoleInfo objUserRole)
        {
            throw new NotImplementedException();
        }

        public override void UserRole_Update(ib_UserRoleInfo objUserRole)
        {
            throw new NotImplementedException();
        }

        public override void UserRole_Delete(int _userRoleId)
        {
            throw new NotImplementedException();
        }
    }
}
